Custom Log Files
The FileSystemObject object is provided with Microsoft’s Scripting Runtime Library and allows access to drive, folder, and file information. This permits direct creation of log files and the ability to append information to them for debugging purposes. Documentation on the File System Object is included on the MSDN website.
Adding a Line of Text to Log Files
Example
Copy
Adding a Line of Text to a Log File
Dim fso
Set fso = CreateObject("Scripting.FileSystemObject")
Set textFile = fso.OpenTextFile("C:\CygNet\Logs\Test.txt", 2, True)
textFile.WriteLine("Log file text.")
textFile.Close

